<template>
    <div :style="{ width: width + 'px' }" class="setting-item">
        <slot />
        <span>{{ name }}</span>
    </div>
</template>

<script setup lang="ts">
const props = withDefaults(defineProps<{
    name?: String,
    width?: Number
}>(), {})
</script>

<style lang='scss' scoped>
.setting-item {
    display: flex;
    flex-direction: column;
    min-width: 110px;
    text-align: start;
    margin-bottom: 5px;

    .name {
        margin-top: 2px;
    }
}
</style>